import Vue from 'vue'
import axios from 'axios'
import VueAxios from 'vue-axios'
import Qs from 'qs';

Vue.prototype.baseUrl='';
Vue.prototype.$get=function(api,data){  
  if (data === undefined) {
      data = {};
  }
  var ox = axios.get(this.baseUrl+api,{params:data});
	return ox;
}
Vue.prototype.$post=function(api,data){
  data = Qs.stringify(data);
  var ox = axios.post(this.baseUrl+api,data);
  return ox;
}

Vue.use(VueAxios, axios)